package cn.ywang.netty.client;

import java.io.OutputStream;
import java.net.Socket;
import java.util.UUID;

/**
 * 客户端
 *
 * @author BeatificWang
 * @date 2019/6/23 13:39
 */
public class Client {

	public static void main(String[] args) throws Exception {

		Socket socket = new Socket("localhost", 8080);
		OutputStream os = socket.getOutputStream();
		String content = UUID.randomUUID().toString();
		System.out.println("客户端发送：" + content);
		os.write(content.getBytes());
		os.close();
		socket.close();
	}
}
